{include file="Include/H_ui_head" /}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 广告列表 <span class="c-gray en">&gt;</span> 广告审核 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="mt-20">
        <table class="table table-border table-bordered table-hover table-bg ">
            <thead>
            <tr class="text-c">
                <th width="10%">序号</th>
                <th width="20%">用户名</th>
                <th width="20%">图片</th>
                <th width="10%">金额（元）</th>
                <th width="10%">时间</th>
                <th width="10%">状态</th>
                <th width="20%">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="rs" id="val" key="k"}
            <tr class="text-c">
                <td>{$k}</td>
                <td>{$val.username}</td>
                <td><a href="/Uploads/adv/{$val.adv_path}" target="_blank"><img style="width:100px" src="/Uploads/adv/{$val.adv_path}" /></a></td>
                <td>{$val.money}</td>
                <td>{$val.create_time}</td>
                <td class="td-status">
                    {if $val.status == 0}
                    审核中
                    {elseif $val.status == 1}
                    通过
                    {else}
                    驳回
                    {/if}
                </td>
                <td class="td-manage">
                    {if $val.status == 0}
                    <a title="审核" href="javascript:;" onclick="member_stop(this,'{$val.id}',1)" class="ml-5" style="text-decoration:none">
                        通过</a>
                    <a title="驳回" href="javascript:;" onclick="member_stop(this,'{$val.id}',2)" class="ml-5" style="text-decoration:none">
                        驳回</a>
                    {/if}
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div style="float: right">{$page}</div>
    </div>
</div>
{include file="Include/H_ui_foot" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__LIB__/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript">
    /*编辑*/
    function member_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-停用*/
    function member_stop(obj,id,status){
        var h,w;
        if(status == 1 ){
            h = "确认要通过吗？";
            w = '已通过';
        }else{
            h = "确认要驳回吗？"
            w = '已驳回';
        }
        layer.confirm(h,function(index){
            $.ajax({
                type: 'POST',
                url: "{:Url('Platform/helpCenter_check')}",
                dataType: 'json',
                data : {id:id,status:status},
                success: function(data){
                    // $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_start(this,id)" href="javascript:;" title="启用"></a>');
                    $(obj).parents("tr").find(".td-status").html('<span class="label label-defaunt radius">'+w+'</span>');
                    $(obj).remove();
                    layer.msg(w);
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
</script>
</body>
</html>
